package com.ksc.storekeeper.client.view.validation;

import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.IsWidget;

public interface IsValidatingWidget<T> extends IsWidget, HasText {

	Validation validate();

	void showInvalid();

	void removeInvalid();

	T getValue();

	Validation validateDouble(String value);

	Validation validateListBox(String value);

	Validation validateEmail();

	Validation validateDoubleWithMinLimit(Double value, Double minValue);

	String getErrorMessage();

	void setMinLength(int length);

	Validation validate(String date);

	Validation validatePassword();

	Validation validatePin();

	void setMaxLength(int length);

}